//
//  TSPublishCell.m
//  TaShuo
//
//  Created by N-X on 2018/3/22.
//  Copyright © 2018年 MRNAN. All rights reserved.
//

#import "TSPublishCell.h"
NSString * const kPublishCellID = @"kPublishCellID";
@interface TSPublishCell()
@property (weak, nonatomic) IBOutlet UIImageView *linePicImageView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UIImageView *headImageView;
// 行程
@property (weak, nonatomic) IBOutlet UILabel *journeyLabel;

@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *descLabel;
@end
@implementation TSPublishCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
}


#pragma mark - setter

- (void)setTitle:(NSString *)title
{
    self.titleLabel.text = title;
}

- (void)setLinePicUrl:(NSString *)linePicUrl
{
    [self.linePicImageView nx_setImageWithUrl:linePicUrl placeHolder:nil complete:^(UIImage *image) {
        self.linePicImageView.image = image;
    }];
}

- (void)setHeadPicUrl:(NSString *)headPicUrl
{
    [self.headImageView nx_setImageWithUrl:headPicUrl placeHolder:nil complete:^(UIImage *image) {
        self.headImageView.image = image;
    }];

    // TODO:下面裁剪圆角图片的时候卡顿特别严重
//    [self.headImageView nx_setCircleImageWithUrl:headPicUrl placeHolder:nil complete:^(UIImage *image) {
//        self.headImageView.image = image;
//    }];
}

- (void)setNameStr:(NSString *)nameStr
{
    self.nameLabel.text = nameStr;
}

- (void)setJourneyStr:(NSString *)journeyStr
{
    self.journeyLabel.text = journeyStr;
}

- (void)setDescStr:(NSString *)descStr
{
    self.descLabel.text = descStr;
}

@end
